Description |
Describes the reason for a script error. Call this function before returning JS_FALSE to give the user information about why the script failed (for example, "wrong number of arguments"). |
Arguments |
JSContext *cx, char *error, size_t sz |
|
 |
cx is the opaque JSContext pointer that was passed to the JavaScript function. |
 |
error is a string containing the error message. The string is copied, so the caller should free the string when it is no longer needed. If the string size is not specified (see sz, below), then the string must be null-terminated. |
 |
sz is the size of the string, in bytes. If sz is 0, then the length of the null-terminated string is computed automatically. |
|
Returns |
A Boolean value indicating success (JS_TRUE ) or failure (JS_FALSE ). |
 |
|